#ifndef HPLCCOMMONSYSTEMPAGE_H
#define HPLCCOMMONSYSTEMPAGE_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>

class HplcCommonSystemPage : public QWidget
{
    Q_OBJECT
public:
    explicit HplcCommonSystemPage(QWidget *parent = nullptr);
    ~HplcCommonSystemPage();

protected:
    virtual void closeEvent(QCloseEvent *event) override;

public slots:
    void onParseCompleted(int id, const QVariant &var);

private:
    // 复位
    QLabel *m_lbReset;
    QLineEdit *m_leReset;
    QPushButton	*m_pbSetReset;
    QPushButton	*m_pbGetReset;
    QHBoxLayout *hblReset;

    // 恢复出厂设置
    QLabel *m_lbRestoreDefault;
    QLineEdit *m_leRestoreDefault;
    QPushButton	*m_pbSetRestoreDefault;
    QPushButton	*m_pbGetRestoreDefault;
    QHBoxLayout *hblRestoreDefault;

    // 保存为出厂设置
    QLabel *m_lbSaveAsDefault;
    QLineEdit *m_leSaveAsDefault;
    QPushButton	*m_pbSetSaveAsDefault;
    QPushButton	*m_pbGetSaveAsDefault;
    QHBoxLayout *hblSaveAsDefault;

    // 超级密码
    QLabel *m_lbSuperPassword;
    QLineEdit *m_leSuperPassword;
    QPushButton	*m_pbSetSuperPassword;
    QPushButton	*m_pbGetSuperPassword;
    QHBoxLayout *hblSuperPassword;

    // 软件版本
    QLabel *m_lbSoftwareVersion;
    QLineEdit *m_leSoftwareVersion;
    QPushButton	*m_pbSetSoftwareVersion;
    QPushButton	*m_pbGetSoftwareVersion;
    QHBoxLayout *hblSoftwareVersion;

    // 硬件版本
    QLabel *m_lbHardwareVersion;
    QLineEdit *m_leHardwareVersion;
    QPushButton	*m_pbSetHardwareVersion;
    QPushButton	*m_pbGetHardwareVersion;
    QHBoxLayout *hblHardwareVersion;

    // 生产日期
    QLabel *m_lbProductDate;
    QLineEdit *m_leProductDate;
    QPushButton	*m_pbSetProductDate;
    QPushButton	*m_pbGetProductDate;
    QHBoxLayout *hblProductDate;

    // 序列号
    QLabel *m_lbSerialNumber;
    QLineEdit *m_leSerialNumber;
    QPushButton	*m_pbSetSerialNumber;
    QPushButton	*m_pbGetSerialNumber;
    QHBoxLayout *hblSerialNumber;

    // 型号
    QLabel *m_lbModel;
    QLineEdit *m_leModel;
    QPushButton	*m_pbSetModel;
    QPushButton	*m_pbGetModel;
    QHBoxLayout *hblModel;

    // 型号字符串
    QLabel *m_lbModelString;
    QLineEdit *m_leModelString;
    QPushButton	*m_pbSetModelString;
    QPushButton	*m_pbGetModelString;
    QHBoxLayout *hblModelString;

    // 使用时间
    QLabel *m_lbUsedTime;
    QLineEdit *m_leUsedTime;
    QPushButton	*m_pbSetUsedTime;
    QPushButton	*m_pbGetUsedTime;
    QHBoxLayout *hblUsedTime;

    // 全部数据
    QLabel *m_lbAllData;
    QLineEdit *m_leAllData;
    QPushButton	*m_pbSetAllData;
    QPushButton	*m_pbGetAllData;
    QHBoxLayout *hblAllData;

    // 协议
    QLabel *m_lbProtocol;
    QLineEdit *m_leProtocol;
    QPushButton	*m_pbSetProtocol;
    QPushButton	*m_pbGetProtocol;
    QHBoxLayout *hblProtocol;
};

#endif // HPLCCOMMONSYSTEMPAGE_H
